<?php
namespace app\webadmin\controller;

use think\Controller;
use think\Db;
use think\Request;
use think\Cache;
class Base extends Controller{

    public function _initialize(){
    }

    public function check_admin_user(){
        $admin_user = Cache::get('admin_user');
        if(!$admin_user){
            header('location:'.'/webadmin/auth/authlogin');
        }
    }

    public function getTags(){
        $tags = Db::name('table_tags')->select();
        return $tags?$tags:[];
    }
}